3.81 \(\int \cosh ^4(c+d x) (a+b \tanh ^2(c+d x)) \, dx\)

Optimal. Leaf size=63 \[ \frac {(a+b) \sinh (c+d x) \cosh ^3(c+d x)}{4 d}+\frac {(3 a-b) \sinh (c+d x) \cosh (c+d x)}{8 d}+\frac {1}{8} x (3 a-b) \]

[Out]

1/8*(3*a-b)*x+1/8*(3*a-b)*cosh(d*x+c)*sinh(d*x+c)/d+1/4*(a+b)*cosh(d*x+c)^3*sinh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3675, 385, 199, 206} \[ \frac {(a+b) \sinh (c+d x) \cosh ^3(c+d x)}{4 d}+\frac {(3 a-b) \sinh (c+d x) \cosh (c+d x)}{8 d}+\frac {1}{8} x (3 a-b) \]

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]^4*(a + b*Tanh[c + d*x]^2),x]

[Out]

((3*a - b)*x)/8 + ((3*a - b)*Cosh[c + d*x]*Sinh[c + d*x])/(8*d) + ((a + b)*Cosh[c + d*x]^3*Sinh[c + d*x])/(4*d
)

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a+b x^2}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {(a+b) \cosh ^3(c+d x) \sinh (c+d x)}{4 d}+\frac {(3 a-b) \operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 d}\\ &=\frac {(3 a-b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {(a+b) \cosh ^3(c+d x) \sinh (c+d x)}{4 d}+\frac {(3 a-b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=\frac {1}{8} (3 a-b) x+\frac {(3 a-b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {(a+b) \cosh ^3(c+d x) \sinh (c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 44, normalized size = 0.70 \[ \frac {(a+b) \sinh (4 (c+d x))+12 a (c+d x)+8 a \sinh (2 (c+d x))-4 b d x}{32 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]^4*(a + b*Tanh[c + d*x]^2),x]

[Out]

(-4*b*d*x + 12*a*(c + d*x) + 8*a*Sinh[2*(c + d*x)] + (a + b)*Sinh[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 63, normalized size = 1.00 \[ \frac {{\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (3 \, a - b\right )} d x + {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 4 \, a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

1/8*((a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (3*a - b)*d*x + ((a + b)*cosh(d*x + c)^3 + 4*a*cosh(d*x + c))*sin
h(d*x + c))/d

________________________________________________________________________________________

giac [A]  time = 0.18, size = 107, normalized size = 1.70 \[ \frac {8 \, {\left (3 \, a - b\right )} d x - {\left (18 \, a e^{\left (4 \, d x + 4 \, c\right )} - 6 \, b e^{\left (4 \, d x + 4 \, c\right )} + 8 \, a e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + {\left (a e^{\left (4 \, d x + 12 \, c\right )} + b e^{\left (4 \, d x + 12 \, c\right )} + 8 \, a e^{\left (2 \, d x + 10 \, c\right )}\right )} e^{\left (-8 \, c\right )}}{64 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

1/64*(8*(3*a - b)*d*x - (18*a*e^(4*d*x + 4*c) - 6*b*e^(4*d*x + 4*c) + 8*a*e^(2*d*x + 2*c) + a + b)*e^(-4*d*x -
 4*c) + (a*e^(4*d*x + 12*c) + b*e^(4*d*x + 12*c) + 8*a*e^(2*d*x + 10*c))*e^(-8*c))/d

________________________________________________________________________________________

maple [A]  time = 0.32, size = 82, normalized size = 1.30 \[ \frac {b \left (\frac {\sinh \left (d x +c \right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a \left (\left (\frac {\left (\cosh ^{3}\left (d x +c \right )\right )}{4}+\frac {3 \cosh \left (d x +c \right )}{8}\right ) \sinh \left (d x +c \right )+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)^4*(a+b*tanh(d*x+c)^2),x)

[Out]

1/d*(b*(1/4*sinh(d*x+c)*cosh(d*x+c)^3-1/8*cosh(d*x+c)*sinh(d*x+c)-1/8*d*x-1/8*c)+a*((1/4*cosh(d*x+c)^3+3/8*cos
h(d*x+c))*sinh(d*x+c)+3/8*d*x+3/8*c))

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 104, normalized size = 1.65 \[ \frac {1}{64} \, a {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} - \frac {1}{64} \, b {\left (\frac {8 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/64*a*(24*x + e^(4*d*x + 4*c)/d + 8*e^(2*d*x + 2*c)/d - 8*e^(-2*d*x - 2*c)/d - e^(-4*d*x - 4*c)/d) - 1/64*b*(
8*(d*x + c)/d - e^(4*d*x + 4*c)/d + e^(-4*d*x - 4*c)/d)

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 74, normalized size = 1.17 \[ x\,\left (\frac {3\,a}{8}-\frac {b}{8}\right )-\frac {{\mathrm {e}}^{-4\,c-4\,d\,x}\,\left (a+b\right )}{64\,d}+\frac {{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a+b\right )}{64\,d}-\frac {a\,{\mathrm {e}}^{-2\,c-2\,d\,x}}{8\,d}+\frac {a\,{\mathrm {e}}^{2\,c+2\,d\,x}}{8\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(c + d*x)^4*(a + b*tanh(c + d*x)^2),x)

[Out]

x*((3*a)/8 - b/8) - (exp(- 4*c - 4*d*x)*(a + b))/(64*d) + (exp(4*c + 4*d*x)*(a + b))/(64*d) - (a*exp(- 2*c - 2
*d*x))/(8*d) + (a*exp(2*c + 2*d*x))/(8*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \cosh ^{4}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)**4*(a+b*tanh(d*x+c)**2),x)

[Out]

Integral((a + b*tanh(c + d*x)**2)*cosh(c + d*x)**4, x)

________________________________________________________________________________________